<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <ol>
        <li>我是第一个孩子</li>
        <li class="currentNode">我是第二个孩子</li>
        <li>我是第三个孩子</li>
    </ol>

    <script>
        let li = document.querySelector(".currentNode");

        console.log("当前元素是：",li.innerHTML);

        console.log("前面的兄弟：",li.previousElementSibling.innerHTML);

        console.log("后面的兄弟：",li.nextElementSibling.innerHTML);


        let parentNode= li.parentElement

        console.log("父元素：",parentNode);


        let lis = parentNode.children;


        console.log(lis);



        
    </script>
</body>
</html>